package cn.gok.entity;

/**
 * @Author: chenfan
 * @Description:
 */
public class Person {



    public String personName = "zhangsan";

    private int age = 19;

    public Person(){

    }

    public Person(int age){

    }

    public Person(int age,String personName){
        this.age = age;
        this.personName = personName;
        System.out.println("通过Person(int age,String personName) 创建person对象");
    }

    private Person(String personName){

    }




    public void eat(){
        System.out.println("Person.eat");
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setAge(String age) {
        System.out.println("age:" + age);
    }


    private void test(){
        System.out.println("私有方法test() run...");
    }

    @Override
    public String toString() {
        return "Person{" +
                "personName='" + personName + '\'' +
                ", age=" + age +
                '}';
    }
}
